home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93b.txt / 000091_icon-group-sender _Fri May 14 18:11:03 1993.msg < prev    next >
Internet Message Format  |  1993-06-16  |  1KB

  1. Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Sat, 15 May 1993 09:22:45 MST
  2. Received: by owl.cs.arizona.edu; Sat, 15 May 1993 09:22:43 MST
  3. Date: Fri, 14 May 93 18:11:03 CDT
  4. From: John David Stone <stone@HILBERT.MATH.GRIN.EDU>
  5. Message-Id: <9305142311.AA24639@HILBERT.MATH.GRIN.EDU>
  6. To: icon-group@cs.arizona.edu
  7. In-Reply-To: Steve Holden's message of Fri, 14 May 93 18:03:46 BST <12646.9305141703@desktop.desktop.co.uk>
  8. Subject: string stripping
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12.         For stripping hyphens and dots out of a string, Steve Holden
  13. suggests:
  14.  
  15.                 bare := ""
  16.                 badchars := '-.'
  17.                 full ? {
  18.                     while bare ||:= tab(many(~badchars)) do
  19.                        tab(many(badchars))
  20.                 }
  21.  
  22. which is tempting, but incorrectly sets bare to "" whenever the value of
  23. full begins with a dot or hyphen.
  24.  
  25. ------  John David Stone - Lecturer in Computer Science and Philosophy  -----
  26. --------------  Manager of the Mathematics Local-Area Network  --------------
  27. --------------  Grinnell College - Grinnell, Iowa 50112 - USA  --------------
  28. --------  stone@math.grin.edu - (515) 269-3181 - stone@grin1.bitnet  --------
  29.